home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 52 / Amiga Format AFCD52 (Issue 136, May 2000).iso / -serious- / programming / c / stormamiga_lib-v45_00d / include / time_stormamiga.h < prev    next >
C/C++ Source or Header  |  2000-02-28  |  1KB  |  65 lines

  1. #ifndef  TIME_STORMAMIGA_H
  2. #define  TIME_STORMAMIGA_H
  3.  
  4. /*
  5. **      $VER: time_stormamiga.h 1.1 (18.09.98)
  6. **             Includes Release 45.00
  7. **
  8. **    Copyright © 1996/2000 by CyberdyneSystems
  9. **
  10. **            written by Matthias Henze
  11. **               All Rights Reserved
  12. */
  13.  
  14. #ifndef  STORMAMIGA_H
  15.   #include <stormamiga.h>
  16. #endif
  17. #ifndef _INCLUDE_TIME_H
  18.   #include <time.h>
  19. #endif
  20.  
  21. #ifdef __cplusplus
  22.   extern "C" {
  23. #endif
  24.  
  25. #define CLK_TCK   50
  26.  
  27. /*----- stormamiga-functions -----*/
  28.  
  29. #ifdef STORMAMIGA_DEUTSCH
  30.   #define strftime    strftime_d
  31.   #define asctime     asctime_d
  32.   #define ctime       ctime_d
  33. #endif
  34.  
  35. int   strftime_d      (char *, uint, cchar *, const struct tm *);
  36. char  *asctime_d      (const struct tm *);
  37. char  *ctime_d        (const time_t *);
  38.  
  39. #ifdef __cplusplus
  40.   }
  41. #endif
  42.  
  43. #ifdef STORMAMIGA_INLINE
  44.  
  45. /*----- ANSI C-functions -----*/
  46.  
  47. __inline struct tm *localtime (const time_t *tp)
  48. { return gmtime          (tp); }
  49.  
  50. #ifndef STORMAMIGA_DEUTSCH
  51.   __inline char *ctime   (const time_t *t)
  52.   { return asctime       (localtime (t)); }
  53. #endif
  54.  
  55. __inline double difftime (time_t t1, time_t t2)
  56. { return (t1 - t2); }
  57.  
  58. /*----- stormamiga-functions -----*/
  59.  
  60. __inline char *ctime_d   (const time_t *t)
  61. { return asctime_d       (localtime (t)); }
  62. #endif  /* STORMAMIGA_INLINE */
  63.  
  64. #endif  /* TIME_STORMAMIGA_H */
  65.